package com.example.myapplication.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class SendMsgReceiver extends BroadcastReceiver {
    private static final String TAG = "SendMsgReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        String msg = intent.getStringExtra("msg");
        Log.d(TAG, "onReceive: " + msg);
        Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
    }
}
